package calao.storage.bdb;

import com.sleepycat.je.DatabaseEntry;

class SearchKeyCursor
extends TableCursor
{

	DatabaseEntry key;

	SearchKeyCursor(TableDatabase tdb) 
	{
		super(tdb);
	}
	
	void setKey(DatabaseEntry key)
	{
		this.key = key;
	}

	@Override
	public boolean nextBdbHit() 
	{
		if (bdbCursor.hitCount==0) return bdbCursor.getSearchKey(key);
		else return bdbCursor.getNextDup();
	}

	@Override
	String getTypeName()
	{
		return "key";
	}

}
